package com.wigem.fa.entity;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wigem.framework.common.util.common.GuidUtils;
import org.apache.poi.hpsf.Decimal;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 企业申报对象 fa_apply
 *
 * @author DH
 * @date 2024-10-20
 */

@Data
@ApiModel
@TableName("fa_apply")
public class FaApplyEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "", name = "id")
    @TableId
    private String id;

    /**
     * 申报企业-项目名称
     */
    @ApiModelProperty(value = "申报企业-项目名称", name = "projectName")
    @TableField(value = "project_name")
    private String projectName;

    @ApiModelProperty(value = "企业名称", name = "orgName")
    @TableField(exist = false)
    private String orgName;

    /**
     * 申报企业id，关联fa_ent_info
     */
    @ApiModelProperty(value = "申报企业id，关联fa_ent_info", name = "entId")
    @TableField(value = "ent_id")
    private String entId;

    /**
     * 报告期id
     */
    @ApiModelProperty(value = "报告期id", name = "reportId")
    @TableField(value = "report_id")
    private String reportId;

    /**
     * 申报类型
     */
    @ApiModelProperty(value = "申报类型", name = "policyType")
    @TableField(value = "policy_type")
    private String policyType;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间", name = "createTime")
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人", name = "createUser")
    @TableField(value = "create_user")
    private String createUser;

    /**
     * 提交时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "提交时间", name = "submitTime")
    @TableField(value = "submit_time")
    private Date submitTime;

    /**
     * 提交人
     */
    @ApiModelProperty(value = "提交人", name = "submitUser")
    @TableField(value = "submit_user")
    private String submitUser;

    /**
     * 提交状态(0待审核，1已提交，未完待续）
     */
    @ApiModelProperty(value = "提交状态(0待审核，1已提交，未完待续）", name = "approveId")
    @TableField(value = "approve_id")
    private String approveId;

    /**
     * 删除标记（0未删除，1已删除）
     */
    @ApiModelProperty(value = "删除标记（0未删除，1已删除）", name = "removeMark")
    @TableField(value = "remove_mark")
    private String removeMark;

    /**
     * 项目信息介绍
     */
    @ApiModelProperty(value = "项目信息介绍", name = "projectIntroduction")
    @TableField(value = "project_introduction")
    private String projectIntroduction;

    /**
     * 拟申请区财政科技经费额度（万元）
     */
    @ApiModelProperty(value = "拟申请区财政科技经费额度（万元）", name = "proposalFund")
    @TableField(value = "proposal_fund")
    private BigDecimal proposalFund;

    /**
     * 申报年份
     */
    @ApiModelProperty(value = "申报年份", name = "reportYear")
    @TableField(value = "report_year")
    private String reportYear;

    /**
     * 去年销售收入（万元）
     */
    @ApiModelProperty(value = "去年销售收入（万元）", name = "lastYearSalesRevenue")
    @TableField(value = "last_year_sales_revenue")
    private BigDecimal lastYearSalesRevenue;

    /**
     * 去年税收（实缴）（万元）
     */
    @ApiModelProperty(value = "去年税收（实缴）（万元）", name = "lastYearTax")
    @TableField(value = "last_year_tax")
    private BigDecimal lastYearTax;

    /**
     * 去年利润（万元）
     */
    @ApiModelProperty(value = "去年利润（万元）", name = "lastYearProfit")
    @TableField(value = "last_year_profit")
    private BigDecimal lastYearProfit;

    /**
     * 前年销售收入（万元）
     */
    @ApiModelProperty(value = "前年销售收入（万元）", name = "beforeLastYearSalesRevenue")
    @TableField(value = "before_last_year_sales_revenue")
    private BigDecimal beforeLastYearSalesRevenue;

    /**
     * 前年税收（实缴）（万元）
     */
    @ApiModelProperty(value = "前年税收（实缴）（万元）", name = "beforeLastYearTax")
    @TableField(value = "before_last_year_tax")
    private BigDecimal beforeLastYearTax;

    /**
     * 前年利润（万元）
     */
    @ApiModelProperty(value = "前年利润（万元）", name = "beforeLastYearProfit")
    @TableField(value = "before_last_year_profit")
    private BigDecimal beforeLastYearProfit;

    /**
     * 去年主营业务收入较前年增长率
     */
    @ApiModelProperty(value = "去年主营业务收入较前年增长率", name = "lastYearBusinessRevenueGrowthRate")
    @TableField(value = "last_year_business_revenue_growth_rate")
    private BigDecimal lastYearBusinessRevenueGrowthRate;

    /**
     * 研发人员占比
     */
    @ApiModelProperty(value = "研发人员占比", name = "rdPersonProportion")
    @TableField(value = "rd_person_proportion")
    private BigDecimal rdPersonProportion;

    /**
     * 近三年专利受理数量
     */
    @ApiModelProperty(value = "近三年专利受理数量", name = "pastThreeYearPatentAcceptCount")
    @TableField(value = "past_three_year_patent_accept_count")
    private Long pastThreeYearPatentAcceptCount;

    /**
     * 近三年专利授权数量
     */
    @ApiModelProperty(value = "近三年专利授权数量", name = "pastThreeYearLicenseCount")
    @TableField(value = "past_three_year_license_count")
    private Long pastThreeYearLicenseCount;

    /**
     * 近三年软件著作权数量
     */
    @ApiModelProperty(value = "近三年软件著作权数量", name = "pastThreeYearCopyrightCount")
    @TableField(value = "past_three_year_copyright_count")
    private Long pastThreeYearCopyrightCount;

    /**
     * 近三年商标及其它数量
     */
    @ApiModelProperty(value = "近三年商标及其它数量", name = "pastThreeYearTrademarksCount")
    @TableField(value = "past_three_year_trademarks_count")
    private Long pastThreeYearTrademarksCount;

    /**
     * 知识产权合计数
     */
    @ApiModelProperty(value = "知识产权合计数", name = "intellectualPropertyRightsCount")
    @TableField(value = "intellectual_property_rights_count")
    private Long intellectualPropertyRightsCount;

    /**
     * 近三年（含本年度）获国家、北京市政府支持项目
     */
    @ApiModelProperty(value = "近三年（含本年度）获国家、北京市政府支持项目", name = "pastThreeYearProjectsSupportedCount")
    @TableField(value = "past_three_year_projects_supported_count")
    private String pastThreeYearProjectsSupportedCount;

    /**
     * 申报材料附件id
     */
    @ApiModelProperty(value = "申报材料附件id", name = "fileId")
    @TableField(value = "file_id")
    private String fileId;

    /**
     * 审批金额（万元）
     */
    @ApiModelProperty(value = "审批金额（万元）", name = "final_fund")
    @TableField(value = "final_fund")
    private BigDecimal finalFund;

    /**
     * 所在阶段（1申报阶段 2事中阶段 3事后阶段 4归档）
     */
    @ApiModelProperty(value = "所在阶段", name = "stage_id")
    @TableField(value = "stage_id")
    private String stageId;

   /**
    * 事中提交状态
    */
    @ApiModelProperty(value = "事中提交状态", name = "mid_stage_approve_id")
    @TableField(value = "mid_stage_approve_id")
    private String midStageApproveId;

    /**
     * 事中提交时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "事中提交时间", name = "mid_stage_submit_time")
    @TableField(value = "mid_stage_submit_time")
    private Date midStageSubmitTime;

    /**
     * 事中专家意见Id
     */
    @ApiModelProperty(value = "事中专家意见Id", name = "mid_stage_expert_opinion_id")
    @TableField(value = "mid_stage_expert_opinion_id")
    private String midStageExpertOpinionId;

    /**
     * 事中专家意见附件id
     */
    @ApiModelProperty(value = "事中专家意见附件id", name = "midStageExpertOpinionFileId")
    @TableField(value = "mid_stage_expert_opinion_file_id")
    private String midStageExpertOpinionFileId;

    /**
     * 事中专家意见
     */
    @ApiModelProperty(value = "事中专家意见", name = "mid_stage_expert_opinion")
    @TableField(value = "mid_stage_expert_opinion")
    private String midStageExpertOpinion;

    /**
     * 事后提交状态
     */
    @ApiModelProperty(value = "事后提交状态", name = "post_stage_approve_id")
    @TableField(value = "post_stage_approve_id")
    private String postStageApproveId;


    /**
     * 事后提交时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "事后提交时间", name = "post_stage_submit_time")
    @TableField(value = "post_stage_submit_time")
    private Date postStageSubmitTime;

    @ApiModelProperty(value = "事中专家意见附件id", name = "postStageExpertOpinionFileId")
    @TableField(value = "post_stage_expert_opinion_file_id")
    private String postStageExpertOpinionFileId;

    @ApiModelProperty(value = "事后专家意见Id", name = "postStageExpertOpinionId")
    @TableField(value = "post_stage_expert_opinion_id")
    private String postStageExpertOpinionId;

    @ApiModelProperty(value = "事后专家意见", name = "postStageExpertOpinion")
    @TableField(value = "post_stage_expert_opinion")
    private String postStageExpertOpinion;

    @ApiModelProperty(value = "延期申请附件Id", name = "postPoneFileId")
    @TableField(value = "post_pone_file_id")
    private String postPoneFileId;

    @ApiModelProperty(value = "延期申请状态", name = "postPoneStatus")
    @TableField(value = "post_pone_status")
    private String postPoneStatus;

    @ApiModelProperty(value = "延期申请时间", name = "postPoneCreateTime")
    @TableField(value = "post_pone_create_time")
    private Date postPoneCreateTime;

    @ApiModelProperty(value = "延期申请开始时间", name = "postPoneSubmitTime")
    @TableField(value = "post_pone_submit_time")
    private Date postPoneSubmitTime;

    @ApiModelProperty(value = "延期申请结束时间", name = "postPoneEndTime")
    @TableField(value = "post_pone_end_time")
    private Date postPoneEndTime;

    @ApiModelProperty(value = "延期申请状态文本", name = "postPoneStatusLabel")
    @TableField(exist = false)
    private String postPoneStatusLabel;

     /**
     * 任务书附件id
     */
    @ApiModelProperty(value = "任务书附件id", name = "taskFileId")
    @TableField(value = "task_file_id")
    private String taskFileId;


    public void create() {
        this.id = GuidUtils.generate();
    }

    public void modify(String keyValue) {
        this.id = keyValue;
    }

}
